﻿@model GSLMS.Entity.TB_SYS_EMP
@{
    ViewBag.Title = "修改密码";
}
<div class="pageContent">
    <form method="post" action="System/Employee/ReSetPwd?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, dialogAjaxDone);">
    @Html.ValidationSummary(true)
    <div class="pageFormContent" layouth="56">
        @Html.HiddenFor(model => model.ID)
        <p>
            <label>
                员工编号：</label>
            @Html.TextBoxFor(model => model.EMPNO, new { @readonly=true})
        </p>
        <p>
          <label>
                姓名：</label>
            @Html.TextBoxFor(model => model.EMPNAME, new { @readonly = true })
             @Html.ValidationMessageFor(model => model.EMPNAME)
        </p>
        
         <p>
          <label>
                用户名：</label>
            @Html.TextBoxFor(model => model.USERNAME, new { @readonly = true })
         </p>
         <p>
          <label>
                密码：</label>
            @Html.TextBox("LOGPWD", "", new { @onchange = "changePwd()", @class = "required" })
            @Html.Hidden("HID_LOGPWD")
         </p>
    </div>
    @Html.Partial("FormButtonBar")
    </form>
   <script src="/Scripts/md5.js" type="text/javascript"></script>
    <script type="text/javascript">
        function changePwd() {
            var logPwd = $("#LOGPWD").val();
            if (logPwd != "") {
                $("#HID_LOGPWD").val(b64_md5(logPwd));
            }
            else {
                $("#HID_LOGPWD").val("");
            }

            //alert(logPwd + "  " + $("#HID_LOGPWD").val());

        }
    </script>
</div>
